#include <stdio.h>
int main()
{
    int a[10] = {3,1,2,10,7,8,9,6,5,4};
    int n, i, j, k, t;
    scanf("%d", &n);
    for(i = 0; i < n - 1; i++)
    {
        k = i;
        for(j = i + 1; j < n; j++)
        {
            if(a[j] > a[k])
                k = j;
        }
        if(k != i)
        {
            t = a[k];
            a[k] = a[i];
            a[i] = t;
        }
    }
    for(i = 0; i < n-1; i++)
        printf("%d ", a[i]);
    printf("%d\n", a[i]);
    return 0;
}

